﻿// Shader-Based-Image-Processing (SBIP)
// http://code.google.com/p/sbip/
//
// Copyright © Frank Nagl, 2009-2011
// admin@franknagl.de
//
namespace SBIP.Helper.DataTypes
{
    using Microsoft.Xna.Framework;

    /// <summary> A Pair of XNA's <see cref="Vector3"/> type. </summary>
    [System.Serializable]
    public struct Vector3Pair
    {
        /// <summary>The start point of the line.</summary>
        public Vector3 P1 { get; set; }

        /// <summary>The end point of the line.</summary>
        public Vector3 P2 { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="PointTriple"/> class.
        /// </summary>
        /// <param name="p1">The start point of the line.</param>
        /// <param name="p2">The end point of the line.</param>
        public Vector3Pair(Vector3 p1, Vector3 p2) : this()
        {
            P1 = p1;
            P2 = p2;
        }

        /// <summary>
        /// Copies the start and end point of the line into a new array.
        /// </summary>
        /// <returns>The array with start and end point of the line.</returns>
        public Vector3[] ToArray()
        {
            return new [] {P1, P2};
        }
    }
}